package com.ai.model.param;

import com.ai.common.vaild.AddGroup;
import com.ai.common.vaild.UpdateGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;

@Data

public class SysUserRoleRelationParam implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键id")
    @NotNull(message = "修改时Id不能为空",groups = {UpdateGroup.class})
    @Null(message = "新增时不可指定id",groups = {AddGroup.class})
    private Integer id;

    @ApiModelProperty("用户id")
    @NotBlank(message = "修改时用户id不能空",groups = {UpdateGroup.class})
    @Null(message = "新增时用户id不能空",groups = {AddGroup.class})
    private String userId;

    @ApiModelProperty("角色id")
    @Null(message = "新增时角色Id不能为空",groups = {AddGroup.class})
    @NotBlank(message = "修改时角色Id不能为空",groups = {UpdateGroup.class})
    private String roleId;
}
